using System;
using System.Collections.Generic;

namespace OpenRay
{
	//Immutable Class
	public abstract class Geometry
	{
		protected readonly List<Point> vertices = new List<Point>();
		protected readonly List<Vector> normals = new List<Vector>();
		protected readonly List<Material> materials = new List<Material>();
		
		protected const float Delta = 0.00005f;
		
		public Geometry( IList<Point> v, IList<Vector> n, IList<Material> m ) 
		{
			vertices.AddRange(v);
			normals.AddRange(n);
			materials.AddRange(m);
		}
		
		public abstract IList<GeometryHit> Trace(Ray r);
		
		public abstract Vector Normal(Point modelHit, InterpolationData interpolation);
		public abstract Material Material(Point modelHit, InterpolationData interpolation);
		public abstract BoundingBox BoundingBox();
	}
}

